package com.bawei.yangzongcai___chenmei.BlankFragment.TableLayoution;


import android.content.Context;
import android.widget.ImageView;

import com.bawei.yangzongcai___chenmei.MVC.BsaeFragment;
import com.bawei.yangzongcai___chenmei.R;
import com.bumptech.glide.Glide;
import com.youth.banner.Banner;
import com.youth.banner.BannerConfig;
import com.youth.banner.Transformer;
import com.youth.banner.loader.ImageLoader;

import java.util.ArrayList;
import java.util.List;


public class BlankFragmentTableLayout3 extends BsaeFragment {


    private Banner banner;

    @Override
    public int bandLayout() {
        return R.layout.fragment_blank_fragment_table_layout3;
    }

    @Override
    public void initView() {

        banner = findbandid(R.id.banner);
    }

    @Override
    public void initDate() {

       List<String> integers = new ArrayList<>();
        integers.add("https://www.4kbizhi.com/d/file/2021/07/13/small103926hWFSf1626143966.jpg");
        integers.add("https://www.4kbizhi.com/d/file/2021/07/22/small112855HzNRy1626924535.jpg");
        integers.add("https://www.4kbizhi.com/d/file/2021/07/22/small101624NYAP31626920184.jpg");
        integers.add("https://www.4kbizhi.com/d/file/2021/07/23/small001526dtSWc1626970526.jpg");
        integers.add("https://www.4kbizhi.com/d/file/2021/06/27/small1153111Uvus1624765991.jpg");
        integers.add("https://www.4kbizhi.com/d/file/2021/07/21/small1052215Kt391626835941.jpg");
        integers.add("https://www.4kbizhi.com/d/file/2021/07/21/small100541jgXOz1626833141.jpg");
        integers.add("https://www.4kbizhi.com/d/file/2021/07/21/small101657I4DNy1626833817.jpg");
        integers.add("https://www.4kbizhi.com/d/file/2021/07/04/small231735DMObV1625411855.jpg");
        integers.add("https://www.4kbizhi.com/d/file/2021/07/13/small103704hnDsd1626143824.jpg");
        integers.add("https://www.4kbizhi.com/d/file/2021/05/25/small191427zAqM81621941267.jpg");
        integers.add("https://www.4kbizhi.com/d/file/2020/08/08/small122525cMdU41596860725.jpg");

        ArrayList<String> strings = new ArrayList<>();
        strings.add("The first step is ");
        strings.add("You can't judge");
        strings.add("To be both a speaker ");
        strings.add("Wealth is the test ");
        strings.add("Every man at forty ");
        strings.add("Sharp tools make ");

        strings.add("The first step");
        strings.add("You can't judge");
        strings.add("To be both a speaker ");
        strings.add("Wealth is the test ");
        strings.add("Every man at forty ");
        strings.add("Sharp tools make good work");

        banner.setImages(integers);
        //       banner.setBannerAnimation(Transformer.ZoomIn);
        banner.setBannerAnimation(Transformer.ZoomIn);

        banner.setBannerTitles(strings);
        banner.setBannerStyle(BannerConfig.NUM_INDICATOR_TITLE);
        banner.setImageLoader(new ImageLoader() {
            @Override
            public void displayImage(Context context, Object path, ImageView imageView) {
                Glide.with(context).load(path).into(imageView);
            }
        }).start();
    }
}
